<template>
	<z-paging-swiper ref="paging" class="z-paging" :swiper-style="{top:'0px'}">
		<template v-slot:top>
			<head-nav isBackShow titleColor="#fff" backTextColor="#fff" textAlign="center" textContent="意向学生" :navStyle="{
					background: `linear-gradient(to right, #3d9bee, #59c2f3)`
				}">
			</head-nav>
			<z-tabs ref="tabs" :current="current" :list="tabList" @change="tabsChange"></z-tabs>
		</template>
		<!-- swiper必须设置height:100%，因为swiper有默认的高度，只有设置高度100%才可以铺满页面  -->
		<swiper class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
			<swiper-item class="swiper-item" v-for="(item, index) in [1,2,3]" :key="index"
				:auto-hide-loading-after-first-loaded="false">
				<z-paging :ref="`paging-${index}`" :fixed="false" :auto="false" style="height: 100%;"
					:paging-style="{top:'0px'}" loading-full-fixed v-model="dataSource[item]"
					:empty-view-img="$getImgSrc('/static/interestedStudents/noData.png')" @query="queryList"
					:empty-view-center="false">
					<view class="items">
						<Item v-for="(item, wxK) in dataSource[index==0? 'data' : index == 1 ? 'dataWx' : 'dataYbm']"
							:key="wxK" :item="item" :tabKey="tabList[current]" />
					</view>
				</z-paging>
			</swiper-item>
		</swiper>

		<template v-slot:bottom>
			<view class="interestedStudents_end">
				<fui-button text="我要上报" @click="$goto('/subPackages/reported/reported')" background="#46A8EF">
				</fui-button>
			</view>
		</template>
	</z-paging-swiper>
</template>

<script setup>
	import http from '@/common/request.js'
	import HeadNav from "@/components/ar-nav/nav.vue"
	import {
		onLoad,
		onUnload
	} from '@dcloudio/uni-app'
	import {
		ref,
		reactive
	} from 'vue'

	const dataSource = reactive({
		1: [],
		2: [],
		3: []
	})
</script>

<style lang="scss" scoped>
	.swiper {
		height: 100%;
	}
</style>
